<el-form ref="form" :model="form" :rules="rules" label-width="140px">
    <el-row :gutter="10">
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="公告类型" prop="GWDH002">
                <el-select v-model="form.GWDH002" size="small" placeholder="请选择公告类型" :disabled="gwdh002">
                    <el-option v-for="item in selectOptions.gwdh002"
                               :label="item.value" :value="item.code">
                    </el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="公告日期" prop="GWDH005">
                <el-date-picker
                        type="date"
                        v-model="form.GWDH005"
                        value-format="yyyy-MM-dd"
                        style="width: 100%">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="发布人员" prop="GWDH004">
                <el-input v-model="form.GWDH004_NAME" readonly clearable>
                    <i class="el-icon-search el-input__icon" @click="openUser" slot="suffix"></i>
                </el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="失效日期" prop="GWDH006">
                <el-date-picker
                        type="date"
                        v-model="form.GWDH006"
                        value-format="yyyy-MM-dd"
                        style="width: 100%">
                </el-date-picker>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="8" :md="8" :lg="8" :xl="8">
            <el-form-item label="有效码" prop="GWDHACTI">
                <el-select v-model="form.GWDHACTI" size="small" clearable>
                    <el-option v-for="item in selectOptions.sys_y_n"
                               :label="item.value" :value="item.code">
                    </el-option>
                </el-select>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="公告主旨" prop="GWDH001">
                <el-input v-model="form.GWDH001"></el-input>
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="公告图档" class="c-upload-text">
                <el-input v-model="form.GWDH008"></el-input>
                <el-upload
                        class="upload-demo"
                        ref="upload1"
                        v-model="form.GWDH008"
                        :action="imgs"
                        list-type="picture"
                        :file-list="imgList"
                        :before-upload="beforeUploadImg"
                        :on-preview="handleImgPreview"
                        :on-remove="handleJpgRemove"
                        :limit="1"
                        :on-exceed="handleExceedImg"
                        :on-success="successUploadImg"
                        :auto-upload="false">
                    <el-button slot="trigger" size="small" type="primary">选取图片</el-button>
                </el-upload>
                <!--<img :src="img" :hidden="status">-->
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
            <el-form-item label="附件" class="c-upload-text">
                <el-upload
                        class="upload-demo"
                        ref="upload2"
                        v-model="form.GWDHE"
                        :action="files"
                        multiple
                        :file-list="fileList"
                        list-type="text"
                        :on-preview="handleFilePreview"
                        :before-upload="beforeUploadFiles"
                        :on-remove="handleFileRemove"
                        :on-success="successUploadFiles"
                        :auto-upload="false">
                    <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
                </el-upload>
                <!--<a :href="address" target="_blank" style="width:40px;">下载</a>-->
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <el-form-item label="公告内容" prop="GWDH007">
                <el-input type="textarea" id="demo" v-model="form.GWDH007"></el-input>
                <!--<textarea id="demo" style="display: none;"></textarea>-->
            </el-form-item>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
            <div class="pos-re">
                <div class="pos-ab" style="margin-bottom: 10px;">
                    <el-button type="primary" size="small"
                               @click="addData">添加
                    </el-button>
                    <el-button type="primary" size="small"
                               @click="del">删除
                    </el-button>
                </div>
                <div class="table-responsive">
                    <table id="user_table"
                           class="layui-table"
                           lay-size="sm"
                           lay-filter="user_table">
                    </table>
                </div>
            </div>
        </el-col>
        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" style="text-align: right;margin-top: 10px;">
            <el-button icon="icon iconfont icon-23" size="mini" @click="cancel">关闭</el-button>
            <el-button type="warning" icon="icon iconfont icon-21" size="mini" @click="sure">保存
            </el-button>
        </el-col>
    </el-row>
</el-form>
<script>
    require(["pc/system/notice_edit"], $.noop);
</script>